<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <script src="https://cdn.staticfile.org/vue/2.4.2/vue.min.js"></script>
</head>

<body>
    <div id="app">
     张俊的{{age}}
        <button v-on:click='reduce(10)'>张俊年龄减十岁</button>
        <button v-on:click='add(10)'>张俊的年龄加十岁</button>
    </div>
    <script>
        var vm=new Vue({
           el:'#app',
           data:{
               age:20,
           },
           methods:{
               reduce:function(a){
                   return this.age+=a;
               },
               add:function(a){
            
                   return this.age-=a;
                
                
               }
           }
        });
        
    </script>
</body>

</html>